<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<title><?=$TableInfo[0]['Alias']?></title> 
<link rel="stylesheet" type="text/css" href="/Public/css/TableDisplay.css">
<link rel="stylesheet" type="text/css" href="/Public/css/Layout.css">
<link rel="stylesheet" type="text/css" href="/Public/css/Theme.css">
<link rel="stylesheet" type="text/css" href="/Public/css/DefaultUI.css">
<link rel="stylesheet" type="text/css" href="/Public/css/PrintUI.css">
<script type="text/javascript" src="/Public/js/JQuery.js"></script>
<script type="text/javascript" src="/Public/js/JQueryUI.js"></script>
<script type="text/javascript" src="/Public/js/SitemapHeader_INC.js"></script>
</head>
<body onload="" onresize="" onunload="">
<div id="Header" style="width: 1350px;">  
<div class="Inner">    
<div class="Logo Right"></div>  
<div class="LabelButton Right" onclick="window.location.href ='__APP__/Login/logout'">退出</div><div class="LabelButton Right">帮助</div>
<div class="Label Right"><?=$_SESSION['UserName']?></div>
<a class="Application" href="__APP__/Index">首页</a>
<div class="Label LabelNoPadding">&gt;</div>
<a class="Application" href=""><?=$TableInfo[0]['Alias']?></a>  </div>
</div>
<div id="Content" class="MenuColapsed" style="min-height: 568px; width: auto;">  
<input type="hidden" name="UserLanguage" id="UserLanguage" value=""> 
<input type="hidden" name="UserDateFormat" id="UserDateFormat" value="1">  
<input type="hidden" name="UserTimeFormat" id="UserTimeFormat" value="1">  
<input type="hidden" name="UserTimeFormat" id="UserPhoneFormat" value="0">  
<div class="Inner">    
<table class="MainLayout" id="MainLayoutTable" cellspacing="0" cellpadding="0" border="0" style="height: 568px; min-height: 568px;">      
<tbody>
<tr>        
<td valign="top" id="MainLayout" class="MainLayoutCell" style="max-height: 100%;">
<table style="width: 100%" cellpadding="0" cellspacing="0" border="0">
<thead class="MainLayoutHeader" id="MainLayoutHeader">
<tr>  
<td class="MainLayoutActions" style="height: 1px;">
<div class="ActionBigLabel" id="ColumnSearchLabel"> 
<div style="float: left; margin-top: 3px; margin-right: 3px;"></div></div>
<div class="ActionButtonContainer" title="Add Roles Time Clock Activities"><a id="ActionButtonAddRolesTimeClockActivities" class="ActionButton ActionButtonExcel" href="__APP__/TableEdit/Index/TableName/<?=$TableInfo[0]['Table']?>"><div class="Title">添加 <?=$TableInfo[0]['Alias']?></div></a></div>
<div class="ActionButtonContainer" title="Excel"><a id="ActionButtonExcel" class="ActionButton ActionButtonExcel" onclick="ToggleExcelMenu();"><div class="Icon Excel"></div><div class="Title IconTitle">Excel</div></a></div>
</td>
</tr>
</thead>
</table>

<table class="Table Fixed" name="XMLData" id="TableView" cellpadding="0" cellspacing="0"><thead> 
  <tr>
  <th class="Parent" style="width: 22px; padding: 0px; min-width: 22px; max-width: 22px;">&nbsp;</th>
  <th class="Parent" style="width: 22px; padding: 0px; min-width: 22px; max-width: 22px;">&nbsp;</th>
  <th class="Parent" style="width: 22px; padding: 0px; min-width: 22px; max-width: 22px;">&nbsp;</th>

  <foreach name="TableFieldsInfo" item="vo">
  <th id="Column0" class="Parent" style="text-align: center; white-space: normal;">
  <div id="ews-column-sort-ID"><span class="Title">{$vo.Alias}</span></div>
  </th>
  </foreach>
</tr>
</thead>
<tbody>
<?php for($i=0; $i <count($TableList); $i++){?>
<tr class="">
<td style="width: 22px; padding: 0px 0px 0px 5px; min-width: 22px; max-width: 22px;">
<div class="LayerControl"><a name="KeyValue4" href="__APP__/TableView/Index/TableName/<?=$TableInfo[0]['Table']?>/KeyID/<?=$TableList[$i][$TableInfo[0]['Key']];?>"><div class="Icon View"></div></a> </div>
</td>
<td style="white-space: nowrap; width: 22px; padding: 0px 0px 0px 5px; min-width: 22px; max-width: 22px;">  
<div class="LayerControl"><a href="__APP__/TableEdit/Index/TableName/<?=$TableInfo[0]['Table']?>/KeyID/<?=$TableList[$i][$TableInfo[0]['Key']];?>/List/1"><div class="Icon Edit"></div></a>  </div>
</td>
<td style="width: 22px; padding: 0px 0px 0px 5px; min-width: 22px; max-width: 22px;">  <div class="LayerControl">    
<a href="__APP__/TableEdit/Deleted/TableName/<?=$TableInfo[0]['Table']?>/KeyID/<?=$TableList[$i][$TableInfo[0]['Key']];?>" style="white-space: nowrap;"><div class="Icon Delete"></div></a>  </div>
</td>
<?php for($j=0; $j < count($TableFieldsInfo); $j++){?>
<?php if($TableFieldsInfo[$j]['Field'] == "TimeUpdated" || $TableFieldsInfo[$j]['Field'] == "TimeCreated"){?>
 <td style="text-align: center; white-space: normal; min-width: 32px; "><?=date("Y/m/d h:i A",strtotime($TableList[$i][$TableFieldsInfo[$j]['Field']]))?></td>
 <?php }else { ?>

 <?php if(($TableInfo[0]['Table'] == "Tables" || $TableInfo[0]['Table'] == "TableFields") && $TableFieldsInfo[$j]['Field'] == "Table" || $TableFieldsInfo[$j]['Field']== "Alias"){?>

 <td style="text-align: center; white-space: normal; min-width: 32px; "><a href="__APP__/TableView/Index/TableName/<?=$TableList[$i]['Table']?>"><?=$TableList[$i][$TableFieldsInfo[$j]['Field']]; ?></a></td>

<?php }else{?>
 <td style="text-align: center; white-space: normal; min-width: 32px;" ><?=$TableList[$i][$TableFieldsInfo[$j]['Field']]; ?></td>
<?php }?>
<?php }?>
<?php }?>
</tr>
<?php }?>
</tbody>
</table>
<div class="Pagination"><?php echo count($TableList);?>条 记录</div>        
</td>      
</tr>    
</tbody>
</table> 
 </div>
 </div>
 <div id="Footer" style="width: 1350px;"> 
  <div class="Inner"><div class="Version"><?php echo date("Y-m-d h:i:s"); ?></div>
  <div class="Version">15.01.01</div>
 </div>
</div>
<script type="text/javascript"> 
SetLayoutHeight();   
</script>
</body></html>